﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AccreditWorkflow.aspx.cs" Inherits="BasePages_AccreditPage_AccreditWorkflow" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title>流程授权</title>
    <LINK href="../../CSS/hfmenu.css" type="text/css" rel="stylesheet">
     <script language="javascript">
 		function showdialogusers()
		{
		  
		  var rv=window.showModalDialog( "SelectUsers.aspx",window,"dialogWidth:580px;dialogHeight:480px");

		  var txtReturnValue=document.getElementById("txtUsers");
		  if (rv!=undefined)
		  {
		    txtReturnValue.value=rv;
		  } 
		}
		
        function Button1_onclick() {
        window.close();
        }


         function CheckAll(oCheckbox) 
           { 
               var GridView2 = document.getElementById("<%=gvAccredit.ClientID %>"); 
               for(i = 1;i < GridView2.rows.length; i++) 
               { 
                   GridView2.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = oCheckbox.checked; 
               } 
           } 
       

		</script>
		<base target="_self">
</head>
<body onload="remove_loading(); top.resizeTo(580,580);" style="font-size: 9pt" onblur="this.focus();">
    <form id="form1" runat="server">
        
        <table style="width: 100%; height:100%" border="1">
        
            
            <tr>
                <td colspan="2" bgcolor="#ffffff" height="15">
                </td>
            </tr>
            <tr>
                <td style="width: 50px" valign="top">
                <div>
                    <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td>
                                <img height="12" src="../../images/index_101.gif" width="12" /></td>
                            <td background="../../images/index_111.gif" style="width: 86px">
                                <img height="1" src="../../images/spacer.gif" width="1" /></td>
                            <td>
                                <img height="12" src="../../images/index_121.GIF" width="12" /></td>
                        </tr>
                        <tr>
                            <td background="../../images/index_08.gif" width="12">
                                &nbsp;</td>
                            <td style="width: 86px">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td align="left" style="height: 174px">
                                                        <asp:TreeView ID="tvWorkflow" runat="server" ExpandDepth="2" NodeIndent="15"
                                                            ShowLines="True">
                                                            <ParentNodeStyle Font-Bold="False" Font-Size="9pt" />
                                                            <HoverNodeStyle Font-Size="9pt" Font-Underline="True" />
                                                            <SelectedNodeStyle Font-Bold="True" Font-Size="9pt" Font-Underline="False" HorizontalPadding="0px"
                                                                VerticalPadding="0px" />
                                                            <NodeStyle Font-Size="9pt" HorizontalPadding="0px" NodeSpacing="0px" VerticalPadding="0px" />
                                                        </asp:TreeView>
                                                    </td>
                                                </tr>
                                            </table>
                                            <asp:Label ID="lblError" runat="server" CssClass="font_error"></asp:Label></td>
                                    </tr>
                                </table>
                            </td>
                            <td background="../../images/index_09.gif" width="12">
                                </td>
                        </tr>
                        <tr>
                            <td>
                                <img height="12" src="../../images/index_10.gif" width="12" /></td>
                            <td background="../../images/index_11.gif" style="width: 86px">
                                <img height="1" src="../../images/spacer.gif" width="1" /></td>
                            <td>
                                <img height="12" src="../../images/index_12.gif" width="12" /></td>
                        </tr>
                    </table></div>
                </td>
                <td valign="top" style="width: 545px; font-family: Arial;">
                    <table style="width: 100%; " border="1">
                        <tr>
                            <td colspan="2">
                                <span style="font-size: 8pt">为下列用户授予左侧选择的处理权限：</span></td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td style="width: 251px">
                                <asp:TextBox ID="txtUsers" runat="server" BorderStyle="Groove" Width="221px"></asp:TextBox></td>
                            <td style="width: 107px">
                                <input id="Button2" onclick="showdialogusers()" style="width: 61px" type="button"
                                    value="选择用户" /></td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td colspan="2">
                                &nbsp;<asp:Button ID="btnOk" runat="server" Text="授权" OnClick="btnOk_Click" />
                                &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
                                <asp:Label ID="Label1" runat="server" Font-Names="Arial" Font-Size="9pt" ForeColor="#FF3300"
                                    Text="重复授权无效!"></asp:Label></td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td colspan="2">
                                您已授出的权限：</td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td colspan="2">
                            <div style=" height:100%; width:100%; overflow:auto">
                                <asp:GridView ID="gvAccredit" runat="server" Width="100%" 
                                    AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                                    GridLines="None" DataKeyNames="AccreditId" Font-Names="Arial" Font-Size="9pt" 
                                    EnableModelValidation="True">
                                    <Columns>
                                        <asp:TemplateField ItemStyle-Width=20%>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="ItemCheckBox" runat="server"  />
                                            </ItemTemplate>
                                            <HeaderTemplate>
                                                <input id="Checkbox2" type="checkbox"  onclick="CheckAll(this)"/>全选
                                            </HeaderTemplate>
                                            <ItemStyle  />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="flowcaption" HeaderText="流程名" >
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="taskcaption" HeaderText="任务名" >
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="ToUserName" HeaderText="授予" >
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                    </Columns>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                                </div>
                                &nbsp;</td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td colspan="2">
                                &nbsp;&nbsp;
                                <asp:Button ID="btnTackAccredit" runat="server" Text="取消授权" OnClick="btnTackAccredit_Click" />
                                </td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td colspan="2">
                                被授予的权限：</td>
                        </tr>
                        <tr style="font-size: 9pt">
                            <td colspan="2">
                                <asp:GridView ID="gvHaveAccredit" runat="server" Width="100%" 
                                    AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                                    GridLines="None" DataKeyNames="AccreditId" Font-Names="Arial" Font-Size="9pt" 
                                    EnableModelValidation="True">
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <Columns>
                                        <asp:BoundField DataField="flowcaption" HeaderText="流程名" >
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="taskcaption" HeaderText="任务名" >
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="fromUserName" HeaderText="授权者" >
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                    </Columns>
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr style="font-size: 9pt">
                <td style="width: 50px">
                </td>
                <td style="width: 545px">
                </td>
            </tr>
        </table>

    </form>
</body>
</html>
